/*
*  滚动隐藏顶部栏
*/
(function(){
    var scroll = document.documentElement.scrollTop;
    var head = document.getElementsByClassName("head")[0];
    var on = false;
    window.onscroll = function(){
        if (on) {
            return;
        }
        on = true;
        var newScroll = document.documentElement.scrollTop;
        if(newScroll-scroll>150 && newScroll > 100){
            head.classList.remove("showHeight");
            head.classList.add("zeroHeight");
        }else if(newScroll-scroll<-100 ||  newScroll < 100){
            head.classList.remove("zeroHeight");
            head.classList.add("showHeight");
        }
        scroll = document.documentElement.scrollTop;
        setTimeout(function(){
            on = false;
        },100);
    }
})();